package cn.wolfcode.qo;

import lombok.Getter;
import lombok.Setter;
import org.springframework.util.StringUtils;

@Getter
@Setter
public class QueryObject {

    private String keyword;
    private Integer current = 1;
    private Integer limit = 3;

    private Integer getStart() {
        return (current - 1) * limit;
    }

    public void setKeyword(String keyword) {
        if(StringUtils.hasText(keyword)){
            this.keyword = keyword;
        }
    }
}
